package y_2025.m04.d11.t03;

abstract class Vehicle {
    protected double speed;
    protected String name;
    protected String color;

    public Vehicle(double speed, String name, String color) {
        this.speed = speed;
        this.name = name;
        this.color = color;
    }

    public abstract void start();
    public abstract void stop();
    public abstract void run();
}

class Aircraft extends Vehicle {
    public Aircraft(double speed, String name, String color) {
        super(speed, name, color);
    }

    @Override
    public void start() {
        System.out.println("飞行器启动");
    }

    @Override
    public void stop() {
        System.out.println("飞行器停止");
    }

    @Override
    public void run() {
        System.out.println("飞行器飞行中");
    }
}

class SpecShuttle extends Aircraft {
    public SpecShuttle(double speed, String name, String color) {
        super(speed, name, color);
    }

    @Override
    public void run() {
        System.out.println("航天飞机执行太空任务");
    }
}

class Jet extends Aircraft {
    public Jet(double speed, String name, String color) {
        super(speed, name, color);
    }

    @Override
    public void run() {
        System.out.println("喷气式飞机高速巡航");
    }
}

public class VehicleTest {
    public static void main(String[] args) {
        SpecShuttle shuttle = new SpecShuttle(8000, "神舟飞船", "银色");
        Jet jet = new Jet(900, "歼击机", "迷彩");
        
        shuttle.start();
        shuttle.run();
        shuttle.stop();
        
        jet.start();
        jet.run();
        jet.stop();
    }
}